import os
import yaml

class GetData:
    def __init__(self):
        pass
    def get_yaml_data(self,file_name):
        # 返回读取yaml文件全部数据
        # with open(".././Data" + os.sep + file_name,"rb") as f: # 测试用
        with open("./Data" + os.sep + file_name,"rb") as f:    #　用例使用
        #     print("我是什么：",yaml.load(f))
            return yaml.load(f)

if __name__ == '__main__':
    # 结果列表
    space_list = []
    datas = GetData().get_yaml_data("data_space.yml")
    data = datas.get("Test_Space_Del_01")
    # return data
    for i in data.keys():
        space_list.append((i, data.get(i).get("value"),data.get(i).get("expect_result").get("value")))
    print(space_list)
